package com.nuoniu.sibanyun.controller.erp.barcode;

import com.nuoniu.sibanyun.common.result.HttpResult;
import com.nuoniu.sibanyun.entity.erp.barcode.vo.BarcodeInOutStatisticVo;
import com.nuoniu.sibanyun.service.erp.barcode.IErpBarcodeInOutService;
import com.nuoniu.sibanyun.userThread.UserInfo;
import com.nuoniu.sibanyun.userThread.UserThreadLocal;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 非标-库存表 前端控制器
 * </p>
 *
 * @author 白强
 * @since 2021-11-30
 */
@RestController
@RequestMapping("/erp/barcodeInOutMain")
@Api(value="ERP非标 库存表", tags={"ERP非标 库存表"})
public class ErpBarcodeInOutController {


    @Autowired
    private IErpBarcodeInOutService barcodeInOutService;

    /**
     * 根据 面积计算表主表ID 查询 出入库情况
     */
    @ApiOperation("根据 面积计算表主表ID 查询 出入库情况")
    @GetMapping("getInOutRecord")
    public HttpResult<BarcodeInOutStatisticVo> getInOutRecord(String sourceVoucherType, Integer sourceVoucherId) {
        return HttpResult.ok(barcodeInOutService.getInOutRecord(sourceVoucherType,sourceVoucherId));
    }

}
